function [thres area]=maskarea(img,div)

try, div;
catch, div=500;
end

N=5;

thres=linspace(min(min(img(img>0))),max(max(img)),div)';

for ii=1:length(thres)
	area(ii,1)=sum(sum(double(img>=thres(ii))));
end

end